/**
 * Orienteering Sport Diary Copyright (C) 2009 OSDiary Team
 *
 * This file is part of Orienteering Sport Diary (OSDiary).
 *
 * OSDiary is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see http://www.gnu.org/licenses/.
 */

package org.actions.race;

import com.opensymphony.xwork2.ActionSupport;
import java.sql.Timestamp;
import org.util.DateUtil;

/**
 * FROM: edit_event.jsp
 * RETURN: evenEditForm.jsp
 *
 * @author George.Mavchun
 */
public class ShowFormAction extends ActionSupport {
    private String eventId;
    private String name;
    private String place;
    private Timestamp timestamp;

    
    public String showRunRace() {
        return "RunRace";      
    }
    
    public String showORace() {
        return "ORace";      
    }

    public String showEventEdit() {
        return "EventEdit";
    }

    public String getDateTimeString() {
        return DateUtil.format(timestamp.getTime(), DateUtil.DATE_AND_TIME_DISPLAY_FORMAT);
    }

    public String getDateString() {
        return DateUtil.format(timestamp.getTime(), DateUtil.DATE_DISPLAY_FORMAT);
    }

    public String getTimeString() {
        return DateUtil.format(timestamp.getTime(), DateUtil.TIME_DISPLAY_FORMAT);
    }

    public void setDateTimeString(String dateTimeString) {
        this.timestamp = new Timestamp(DateUtil.parse(dateTimeString, DateUtil.DATE_AND_TIME_DISPLAY_FORMAT));
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEventId() {
        return eventId;
    }

    public void setEventId(String eventId) {
        this.eventId = eventId;
    }

    public String getPlace() {
        return place;
    }

    public void setPlace(String place) {
        this.place = place;
    }
}
